package com.example.demo.properties;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties
@Data
public class ProjectBaseMsgProps {


    /**
     * 端口号,设置默认值:8024,如果已配置该参数,则会覆盖
     */
    @Value("${server.port:8024}")
    private String port;

    /**
     * 项目路径
     */
    @Value("${server.servlet.context-path}")
    private String contextPath;


}
